Skip to content

fix: register native modules and Fabric components for Expo/New Architecture compatibility#39

Merged
arstiefel merged 1 commit intomainfrom
fix-register-native-modules-and
Mar 26, 2026
Merged

fix: register native modules and Fabric components for Expo/New Architecture compatibility#39
arstiefel merged 1 commit intomainfrom
fix-register-native-modules-and

Conversation

@arstiefel
Copy link
Copy Markdown
Collaborator

@arstiefel arstiefel commented Mar 26, 2026

Description

Fixes native module discovery for Expo and New Architecture (Fabric/TurboModules) consumers. Three issues prevented the SDK from working in expo run:android / expo run:ios projects:

  1. Android: GooglePayModule and NetworkingModule were never registered in BoltReactNativeSdkPackage, so TurboModuleRegistry.get() returned null. Both are legacy (ReactContextBaseJavaModule) modules
    and are now registered with isTurboModule = false so bridge interop resolves them correctly.
  2. iOS: BoltApplePayButton was missing from the codegen-generated RCTThirdPartyComponentsProvider, causing an "unimplemented component" error at runtime. Added ios.componentProvider to codegenConfig
    in package.json to register it. Also added RCT_EXTERN_MODULE Objective-C bridge files for the BoltApplePay and BoltNetworking Swift modules.
  3. Cross-platform: Added platform-specific stubs (NativeApplePayButton.android.ts, NativeGooglePayButton.ios.ts) so codegenNativeComponent is never called for a component that doesn't exist on the
    current platform.

Testing

  • Verified on Android emulator: TurboModuleRegistry.get('BoltGooglePay')true, TurboModuleRegistry.get('BoltNetworking')true, TurboModuleRegistry.get('BoltApplePay')false (expected).
  • Verified on iOS simulator: TurboModuleRegistry.get('BoltApplePay')true, TurboModuleRegistry.get('BoltNetworking')true, TurboModuleRegistry.get('BoltGooglePay')false (expected).
  • Confirmed RCTThirdPartyComponentsProvider.mm now includes BoltApplePayButton → ApplePayButtonComponentView after pod install.
  • yarn typecheck, yarn test (115 tests pass), both yarn example ios and yarn example android build and launch successfully.
  • Merchant testing: have the reporting merchant rebuild with this version to confirm the "Could not find component config" and "unimplemented component" errors are resolved.

Security Review

Important

A security review is required for every PR in this repository to comply with PCI requirements.

  • I have considered and reviewed security implications of this PR and included the summary below.

Security Impact Summary

No security-sensitive changes. This PR only fixes native module registration and Fabric component discovery. It does not touch authentication, authorization, payment flows, user data handling, or external
integrations.

@arstiefel arstiefel requested review from a team as code owners March 26, 2026 13:12
@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Mar 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@arstiefel arstiefel force-pushed the fix-register-native-modules-and branch from f231691 to 35aad1d Compare March 26, 2026 13:13
@arstiefel arstiefel enabled auto-merge (squash) March 26, 2026 13:13
@arstiefel arstiefel merged commit 56e7630 into main Mar 26, 2026
8 of 11 checks passed
@arstiefel arstiefel deleted the fix-register-native-modules-and branch March 26, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants